<?php

namespace app\data\controller\activity\setting;

use app\data\model\ActSettingType;
use app\index\controller\BaseController;

class Type extends BaseController
{
    /**
     * 列表
     * @auth true
     * @login true
     * @menu true
     * @return void
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function index()
    {
        $this->title ='活动主题设置';
        ActSettingType::mQuery()
            ->like('name')
            ->order('id desc')
            ->page();
    }

    /**
     * 主题表单
     * @auth true
     * @return void
     */
    public function form()
    {
        ActSettingType::mForm('form');
    }

    /**
     * 删除用户
     * @auth true
     * @return void
     */
    public function remove()
    {
        ActSettingType::destroy(input('id'));
        $this->success('删除成功！');;
    }

}